package com.ruoyi.kiku.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.kiku.domain.KikuWeiboDetail;
import com.ruoyi.kiku.mapper.KikuWeiboDetailMapper;
import com.ruoyi.kiku.service.IKikuWeiboDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 小鞠微博详情Service业务层处理
 *
 * @author TT
 * @date 2025-03-03
 */
@Service
public class KikuWeiboDetailServiceImpl implements IKikuWeiboDetailService
{
    @Autowired
    private KikuWeiboDetailMapper kikuWeiboDetailMapper;

    /**
     * 查询小鞠微博详情
     *
     * @param id 小鞠微博详情主键
     * @return 小鞠微博详情
     */
    @Override
    public KikuWeiboDetail selectKikuWeiboDetailById(Long id)
    {
        return kikuWeiboDetailMapper.selectKikuWeiboDetailById(id);
    }

    /**
     * 查询小鞠微博详情列表
     *
     * @param kikuWeiboDetail 小鞠微博详情
     * @return 小鞠微博详情
     */
    @Override
    public List<KikuWeiboDetail> selectKikuWeiboDetailList(KikuWeiboDetail kikuWeiboDetail)
    {
        return kikuWeiboDetailMapper.selectKikuWeiboDetailList(kikuWeiboDetail);
    }

    /**
     * 新增小鞠微博详情
     *
     * @param kikuWeiboDetail 小鞠微博详情
     * @return 结果
     */
    @Override
    public int insertKikuWeiboDetail(KikuWeiboDetail kikuWeiboDetail)
    {
        kikuWeiboDetail.setCreateTime(DateUtils.getNowDate());
        return kikuWeiboDetailMapper.insertKikuWeiboDetail(kikuWeiboDetail);
    }

    /**
     * 修改小鞠微博详情
     *
     * @param kikuWeiboDetail 小鞠微博详情
     * @return 结果
     */
    @Override
    public int updateKikuWeiboDetail(KikuWeiboDetail kikuWeiboDetail)
    {
        kikuWeiboDetail.setUpdateTime(DateUtils.getNowDate());
        return kikuWeiboDetailMapper.updateKikuWeiboDetail(kikuWeiboDetail);
    }

    /**
     * 批量删除小鞠微博详情
     *
     * @param ids 需要删除的小鞠微博详情主键
     * @return 结果
     */
    @Override
    public int deleteKikuWeiboDetailByIds(Long[] ids)
    {
        return kikuWeiboDetailMapper.deleteKikuWeiboDetailByIds(ids);
    }

    /**
     * 删除小鞠微博详情信息
     *
     * @param id 小鞠微博详情主键
     * @return 结果
     */
    @Override
    public int deleteKikuWeiboDetailById(Long id)
    {
        return kikuWeiboDetailMapper.deleteKikuWeiboDetailById(id);
    }
}
